Ext.define('extjs6test.view.core.JurisdictionEditWindow',{
    extend:'extjs6test.view.base.BaseEditWindow',
    alias:'widget.jurisew',
    controller:'juriewc',
    formStore:null,
    formRecord:null,
    mode:null,
    initComponent:function () {
        Ext.apply(this,{
            formItems:[
                {
                    xtype:'fieldset',
                    padding:9,
                    title:'Jurisdiction',
                    defaults:{
                        xtype:'textfield'
                    },
                    items:[
                        {
                            bind:{
                                fieldLabel:'{jurisdictionEditWindow.jurisdictionIdTF.text}'
                            },
                            name:'id',
                            minLength:1,
                            maxLength:30,
                            allowBlank:true,
                            hidden:true
                        },
                        {
                            bind:{
                                fieldLabel:'{jurisdictionEditWindow.juriCodeTF.text}'
                            },
                            name:'juriCode',
                            minLength:1,
                            maxLength:20,
                            allowBlank:false
                        },
                        {
                            bind:{
                                fieldLabel:'{jurisdictionEditWindow.juriNameTF.text}'
                            },
                            name:'juriName',
                            minLength:1,
                            maxLength:30,
                            allowBlank:false
                        },
                        {
                            bind:{
                                fieldLabel:'{jurisdictionEditWindow.juriFullCodeTF.text}'
                            },
                            name:'juriFullCode',
                            minLength:1,
                            maxLength:300,
                            allowBlank:false
                        },
                        {
                            bind:{
                                fieldLabel:'{jurisdictionEditWindow.juriLevelTF.text}'
                            },
                            name:'juriLevel',
                            minLength:1,
                            maxLength:30,
                            allowBlank:false
                        },
                        {
                            bind:{
                                fieldLabel:'{jurisdictionEditWindow.parentIdTF.text}'
                            },
                            name:'juriParentId',
                            xtype:'hidden',
                            minLength:1,
                            maxLength:45,
                            readOnly:true,
                            allowBlank:true
                        },
                        {
                          bind:{
                              fieldLabel:'{jurisdictionEditWindow.parentNameTF.text}'
                          },
                            name:'juriParent.juriName',
                            minLength:1,
                            maxLength:30,
                            readOnly:true,
                            allowBlank:true
                        },
                        {
                            bind:{
                                fieldLabel:'{jurisdictionEditWindow.leafTF.text}'
                            },
                            name:'leaf',
                            xtype:'hidden',
                            minLength:1,
                            maxLength:1,
                            allowBlank:false,
                            defaultValue:'1'
                        }
                    ]
                },
                {
                    xtype:'checkbox',
                    boxLabel:'Is continue ?',
                    name:'isContinue'
                }
            ]
        });

        this.callParent(arguments);

        if(this.formRecord){
            var form=this.down('form');
            form.loadRecord(this.formRecord);
        }
    }
});